For conventional image processing technology, some effective methods are usually required to change the size of an original image, and further to ensure that a target image obtained has a better quality, without obvious image distortion.
Generally, conventional image zooming is implemented by a bilinear interpolation method that can eliminate obvious image quality problems such as sawtooth and/or mosaic, and can keep pixel information of the original image so that the zoomed target image is smoother and better for vision.
FIG. 3 is a schematic diagram illustrating a conventional device 100 for image zooming. The device 100 includes a data input unit 102, a first data storage unit 104, a first directional image zooming unit 106, a second data storage unit 108, a second directional image zooming unit 110 and an image output unit 112. A first direction and a second direction are vertical to each other.
The data input unit is adapted to input positions and gray values of individual pixels in the original image to the first data storage unit 104.
The first data storage unit 104 is adapted to store the positions and the gray values of the individual pixels in the original image temporarily, and input the gray values of the individual pixels in the original image to the first directional image zooming unit 106 in turn.
The first directional image zooming unit 106 is adapted to read the gray value of the pixel on a former channel of two adjacent channels in the first direction from the first data storage unit 104, and then read that on a latter one. The first directional image zooming unit 106 further calculates gray values of pixels to be inserted according to the gray values of the pixels on the two adjacent channels, inserts new pixels to finish the first directional zooming of the image, and then sends the image zoomed in the first direction to the second data storage unit 100.
The second data storage unit 108 is adapted to store positions and gray values of the individual pixels in the image zoomed in the first direction, and input the gray values of the pixels in the image zoomed in the first direction to the second directional image zooming unit 110 in turn.
The second directional image zooming unit 110 is adapted to receive gray values of pixels on two adjacent channels in the second direction from the second data storage unit 108, calculate gray values of pixels to be inserted, insert new pixels to finish the second directional zooming of the image, and input a target image obtained and zoomed finally to the image output unit 112.
The image output unit 112 is adapted to output the target image received from the second directional image zooming unit 110.
According to the principle of the bilinear interpolation performed for image zooming, the first data storage unit 104 generally writes the gray value of the pixel on the former channel of two adjacent channels in the first direction into the first directional image zooming unit 106, and afterwards writes that gray value from the latter channel into the first directional image zooming unit 106, after which the gray values of the pixels on the two adjacent channels are written, and then the interpolation zooming is performed to obtain the gray values of pixels to be inserted between the two adjacent channels, and thereby the final target image is obtained. As shown in FIG. 3, after reading the gray value of the pixel in the original image on the former channel of the two adjacent channels, the first directional image zooming unit 106 needs to wait for one clock period to continue to read the gray value of the pixel in the original image on the latter channel, and then inserts new pixels into gaps generated in the target image to finish the interpolation zooming of the image. The image zooming in the second direction is basically the same as that in the first direction. In the conventional device for image zooming, the speed and efficiency of data reading are relatively slow, and thus the speed of image zooming by the linear interpolation is relatively slow.